package com.pxxy.entity;

import java.util.List;
import java.util.Objects;

/******************
 * @Author yejf
 * @Description 会员卡，与会员是多对多关联
 */
public class MemberCard {

    private Integer id;

    private String cardName;   //卡的名称

    private String cardType; //卡类型

    private List<Member> memberList;

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("MemberCard{");
        sb.append("id=").append(id);
        sb.append(", cardName='").append(cardName).append('\'');
        sb.append(", cardType='").append(cardType).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MemberCard that = (MemberCard) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(cardName, that.cardName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, cardName);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public List<Member> getMemberList() {
        return memberList;
    }

    public void setMemberList(List<Member> memberList) {
        this.memberList = memberList;
    }
}
